<?php



?>
<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/js/pages/adminSiteAccount_list.js"></script>

<?php include $this->getLayoutFile('block_top_messages'); ?>
<form id="searchForm" class="searchForm1" method="post" action="">

    <fieldset>
        <legend>搜尋</legend>

        <div class="field">
            <label for="搜尋關鍵字">搜尋關鍵字</label>
            <div class="show">
                <input type="text" name="searchKey" value="<?php echo $searchKey; ?>" size="30" />
            </div>
            <div class="info"></div>
        </div>

        <div class="field">
            <label for="show">&nbsp;</label>
            <div class="show">
                <input class="submit" type="submit" value="顯示" />
            </div>
            <div class="info"></div>
        </div>

    </fieldset>

</form>
<br style="clear:both" />

<div class="block">
    <a class="button1" href="<?php echo $this->url->get('adminSiteAccount','new',$user); ?>" >建立</a>
</div>

<form id="listForm" method="post" action="<?php echo $this->createUrl('adminSiteAccount/delete'); ?>">

    <table class="table1" cellspacing="0">
        <tr>
            <th class="nobg">
                <input class="checkbox" type="checkbox" id="chooseItemsAll" value="1" />
            </th>
            <th> id          </th>
            <th> account     </th>
            <th> 權限列表    </th>
            <th> status      </th>
            <th> update date </th>
            <th> email       </th>
        </tr>
        <?php
            foreach( $users as $user ) {
                echo '<tr>';
                echo '    <th><input class="checkbox" type="checkbox" name="chooseItems[]" value="'. $user->getId()     .'"></th>';
                echo '    <td>'. $user->getId()                                                                         .'</td>';
                echo '    <td><a href="'. $this->url->get('adminSiteAccount','edit',$user) .'">'. $user->getAccount()   .'</a></td>';
                echo '    <td>';

                foreach( $user->getUserPermissionCategories() as $category ) {
                    echo $category->getName() .'&nbsp;';
                }

                echo '    </td>';
                echo '    <td>'. $user->trByStatus('status', $user->getStatus())                                        .'</td>';
                echo '    <td>'. $user->getUpdateDateByFormat('Y-m-d')                                                  .'</td>';
                echo '    <td>'. $user->getEmail()                                                                      .'</td>';
                //echo '    <td><a href="'. $this->url->get('adminSiteAccount','edit',$user) .'">edit</a></td>';
                echo '</tr>';
            }
        ?>
    </table>

    <?php  if( $this->pageLimit ) { echo '<div>'. $this->pageLimit->render() .'</div>'; }  ?>

    <div class="rightBlock">
        <?php
            //<a class="button1" href="<?php echo $this->url->get('adminSiteAccount','delete',$user); xxxxxxxxxx>" >選擇刪除1</a>
            //<input class="button1" type="button" id="deleteSbumit" value="選擇刪除2" />
            //<input class="button1" type="button" id="HappySubmit"  value="快樂選擇"  />
        ?>
        <input class="button1" type="button" id="deleteSubmit" value="選擇刪除" />
    </div>

</form>

<?php


